<?php
/* @var $this EventFieldController */
/* @var $model EventField */
/* @var $form CActiveForm */
?>
<div id="update_form">
<!-- form start -->

<div class="zyWell">Fields with<span class="required">*</span>are required.</div>

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'event-field-form',
	'enableAjaxValidation'=>false,
)); ?>
<?php echo $form->errorSummary($model); ?>

	<div class="row-fluid">
		<div class="span6">
			<div class="form-row control-group row-fluid">
				<?php echo $form->labelEx($model,'field_label_cn'); ?>
					<div class="controls span7">
						<?php echo $form->textField($model,'field_label_cn',array('size'=>60,'maxlength'=>255)); ?>
						<?php echo $form->error($model,'field_label_cn'); ?>
					</div>
			</div>
		</div>
			<div class="span6">
			<div class="form-row control-group row-fluid">
				<?php echo $form->labelEx($model,'field_label_en'); ?>
					<div class="controls span7">
						<?php echo $form->textField($model,'field_label_en',array('size'=>60,'maxlength'=>255)); ?>
						<?php echo $form->error($model,'field_label_en'); ?>
					</div>
			</div>
		</div>
	</div>
	<div class="row-fluid">
			<div class="span6">
			<div class="form-row control-group row-fluid">
				<?php echo $form->labelEx($model,'field_name'); ?>
					<div class="controls span7">
						<?php echo $form->textField($model,'field_name',array('size'=>60,'maxlength'=>255)); ?>
						<?php echo $form->error($model,'field_name'); ?>
					</div>
			</div>
		</div>
		<div class="span6">
			<div class="form-row control-group row-fluid">
				<?php echo $form->labelEx($model,'field_type'); ?>
					<div class="controls span7">
						<?php echo $form->dropDownList($model,'field_type',array('text'=>'text','select'=>'select','radio'=>'radio','checkbox'=>'checkbox'),array('prompt'=>'--请选择--') ); ?>
						<?php echo $form->error($model,'field_type'); ?>
					</div>
			</div>
		</div>	
	</div>
	<div class="row-fluid">
		<div class="span6">
			<div class="form-row control-group row-fluid">
				<?php echo $form->labelEx($model,'field_option_cn'); ?>
					<div class="controls span7">
						<?php echo $form->textArea($model,'field_option_cn',array('size'=>60,'maxlength'=>255,'rows'=>5)); ?>
						<?php echo $form->error($model,'field_option_cn'); ?>
					</div>
			</div>
		</div>
		<div class="span6">
			<div class="form-row control-group row-fluid">
				<?php echo $form->labelEx($model,'field_option_en'); ?>
					<div class="controls span7">
						<?php echo $form->textArea($model,'field_option_en',array('size'=>60,'maxlength'=>255,'rows'=>5)); ?>
						<?php echo $form->error($model,'field_option_en'); ?>
					</div>
			</div>
		</div>
	</div>
	<div class="row-fluid">
		<div class="span6">
			<div class="form-row control-group row-fluid">
				<?php echo $form->labelEx($model,'event_id'); ?>
				<?php if(Yii::app()->user->level() == 1){?>
					<div class="controls span7">
						<?php echo $form->dropDownList($model,'event_id',CHtml::listData( Event::model()->findAll(), 'event_id', 'event_title'),array('prompt'=>'--请选择--')); ?>
						<?php echo $form->error($model,'event_id'); ?>
					</div>
				<?php }else{?>
						<div class="controls span7">
						<?php echo $form->dropDownList($model,'event_id',EventField::model()->getEvent()); ?>
						<?php echo $form->error($model,'event_id'); ?>
					</div>
					<?php }?>
			</div>
		</div>
		</div>
<div class="form-actions row-fluid">
	<div class="span7 offset3">
		<?php echo CHtml::submitButton($model->isNewRecord ? Yii::t("common","Create") : Yii::t("common","Save"),array('class'=>'btn btn-large btn-block')); ?>
	</div>
</div>
<?php $this->endWidget(); ?>
</div>
<!-- form -->